﻿IF OBJECT_ID ('dbo.CHO_ROLES') IS NOT NULL
	DROP TABLE dbo.CHO_ROLES
GO

IF OBJECT_ID ('dbo.CHO_USER_ROLES') IS NOT NULL
	DROP TABLE dbo.CHO_USER_ROLES
GO

IF OBJECT_ID ('dbo.CHO_ROLE_POLICY') IS NOT NULL
	DROP TABLE dbo.CHO_ROLE_POLICY
GO

IF OBJECT_ID ('dbo.CHO_SELECT_ROLES') IS NOT NULL
	DROP PROC dbo.CHO_SELECT_ROLES
GO

IF OBJECT_ID ('dbo.CHO_ADD_OR_UPDATE_ROLE') IS NOT NULL
	DROP PROC dbo.CHO_ADD_OR_UPDATE_ROLE
GO

IF OBJECT_ID ('dbo.CHO_DELETE_ROLE') IS NOT NULL
	DROP PROC dbo.CHO_DELETE_ROLE
GO

IF OBJECT_ID ('dbo.CHO_SELECT_USER_ROLE') IS NOT NULL
	DROP PROC dbo.CHO_SELECT_USER_ROLE
GO

IF OBJECT_ID ('dbo.CHO_ADD_USER_ROLE') IS NOT NULL
	DROP PROC dbo.CHO_ADD_USER_ROLE
GO

IF OBJECT_ID ('dbo.CHO_DELETE_USER_ROLE') IS NOT NULL
	DROP PROC dbo.CHO_DELETE_USER_ROLE
GO

IF OBJECT_ID ('dbo.CHO_SELECT_ROLE_POLICY') IS NOT NULL
	DROP PROC dbo.CHO_SELECT_ROLE_POLICY
GO

IF OBJECT_ID ('dbo.CHO_ADD_ROLE_POLICY') IS NOT NULL
	DROP PROC dbo.CHO_ADD_ROLE_POLICY
GO

IF OBJECT_ID ('dbo.CHO_DELETE_ROLE_POLICY') IS NOT NULL
	DROP PROC dbo.CHO_DELETE_ROLE_POLICY
GO

IF OBJECT_ID ('dbo.CHO_SELECT_POLICY_FOR_USER') IS NOT NULL
	DROP PROC dbo.CHO_SELECT_POLICY_FOR_USER
GO
